//
//  KuKu_Runer.m
//  kuku
//
//  Created by 清风徐来 on 2024/1/29.
//

#import "KuKu_Runer.h"
#import <OCRunner/OCRunner.h>
#import <objc/message.h>

@implementation KuKu_Runer

static KuKu_Runer *_sharedInstance;
+ (instancetype)shared {
    if(_sharedInstance == nil) {
        _sharedInstance = [[KuKu_Runer alloc] init];
    }
    return _sharedInstance;
}

+(instancetype)allocWithZone:(struct _NSZone *)zone {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedInstance = [super allocWithZone:zone];
    });
    return _sharedInstance;
}

- (id)copyWithZone:(NSZone *)zone {
    return _sharedInstance;
}

- (id)mutableCopyWithZone:(NSZone *)zone {
    return _sharedInstance;
}

// 加载补丁
- (void)excuteBinaryPatchFile:(NSString *)binaryPatchFilePath {
    [ORInterpreter excuteBinaryPatchFile:binaryPatchFilePath];
}

@end
